package com.aaa.ssm.dao;

import com.aaa.ssm.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ fileName:SysUserDao
 * @ description:
 * @ author:张圣福
 * @ createTime:2023/10/8 20:23
 * @ version:1.0.0
 */
public interface SysUserDao {
    List<SysUser> queryAll(SysUser sysUser);
    SysUser queryById(Integer userId);
    int add(SysUser sysUser);
    int update(SysUser sysUser);
    int deleteById(Integer userId);


      /*
     * 分配角色
     * */
    int addUserRole(@Param("userId") Integer userId,@Param("checkedRole") Integer[] checkedRole);

    /*
     * 删除用户当前的角色
     * */
    int deleteByUserId(Integer userId);
}
